tools: xl: more const-correctness
authorIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 8 Nov 2010 17:05:14 +0000 (17:05 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 8 Nov 2010 17:05:14 +0000 (17:05 +0000)
commitdeaa319f11a598b4ddb22ac840b3ba66585a2a65
tree76750201b700368997ecbf29b5c29964758198de
parent0d849111924534fe280d7d9ab6c2bf97772c3daf
tools: xl: more const-correctness

The implementation of xl was lacking a lot of consts on its char*s.
In this patch we improve matters.  It doesn't fix everything.  In
particular:

  * I only changed char*s and not other structs that ought to be const.

  * libxl_send_debug_keys should take a const char* but the pointer
    ends up getting sent to DECLARE_HYPERCALL_BOUNCE from xc_private.h
    and that won't take a const char*.  I wasn't sure what to do so
    I have left it.

  * There is a great deal of in-place string tokenisation (both
    ad-hoc, and using strtok_r).  I haven't changed any of that.

  * I haven't changed any of the occurrences of char **argv because of
    the castless assignment incompatibility between const char** and
    char **.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/xl.h
tools/libxl/xl_cmdimpl.c